cmake_minimum_required(VERSION 3.16)

project(test_sub)

find_package(OpenCV REQUIRED)


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_CXX_STANDARD 11)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/..)

include_directories(/usr/local/include/opencv4/opencv2)
include_directories(/usr/local/include/opencv4)
include_directories(./inc)
include_directories(./inc/asio)
include_directories(./inc/common)
include_directories(./inc/own)
include_directories(./inc/json)

link_directories(./libs)

aux_source_directory(./src DIR_SRCS)

add_executable(${PROJECT_NAME} ${DIR_SRCS})

target_link_libraries(${PROJECT_NAME} -L./libs -ljsoncpp)
target_link_libraries(${PROJECT_NAME} -L/usr/local/lib -lopencv_gapi -lopencv_barcode -lopencv_bioinspired -lopencv_cudabgsegm -lopencv_cudacodec -lopencv_cudalegacy -lopencv_cudawarping -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_phase_unwrapping -lopencv_quality -lopencv_reg -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_videoio -lopencv_video -lopencv_imgcodecs -lopencv_plot -lopencv_ml -lopencv_flann -lopencv_wechat_qrcode -lopencv_dnn -lopencv_xphoto -lopencv_photo -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_ccalib -lopencv_imgproc -lopencv_cudaarithm -lopencv_core -lopencv_cudev -lopencv_calib3d)
target_link_libraries(${PROJECT_NAME} -L./libs -ldarknet)
target_link_libraries(${PROJECT_NAME} -L/usr/lib/x86_64-linux-gnu/ -ljpeg)
target_link_libraries(${PROJECT_NAME} -lpthread)
